#pragma once

#include "Render.h"
#include "Window.h"

static void mainLoopLauncher(void(*draw)(void)) {

	bool running = true;
	while (running) {
		SDL_Event event;
		while (SDL_PollEvent(&event)) {
			switch (event.type) {
			case SDL_QUIT:
				running = false;
				break;

			case SDL_KEYDOWN:
				running = CameraManager::instance().keyboardHandler(event.key.keysym.sym);
				break;

			case SDL_MOUSEMOTION:
				CameraManager::instance().mouseHandler();
				break;
			}
		}
		draw();
	}

}
